---
# tasks file for hd-idle
- name: Ensure hd-idle is installed
  ansible.builtin.apt:
    deb: "{{ hd_idle_url }}"
  tags: ["hd-idle","install"]
- name: Ensure hd-idle is configured
  ansible.builtin.template:
    src: 'hd-idle.j2'
    dest: '/etc/default/hd-idle'
    owner: root
    group: root
    mode: '0644'
  notify: Restart hd-idle
  tags: ["hd-idle","configure"]
- name: Ensure hd-idle service is enabled and started
  ansible.builtin.service:
    name: hd-idle
    state: started
    enabled: true
  tags: ["hd-idle","configure"]
